package com.cnap.multiclouldmgmt.model.microSvc.assist;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;

/**
 * 内存使用的情况
 *
 * @author xc
 **/
@ApiModel(value = "com.cnap.multiclouldmgmt.model.microSvc.assist.AlarmSvcDataModel",description = "帮助告警统计进行使用率处理的model")
public class AlarmSvcDataModel {

    //记录时间
    @ApiModelProperty(value = "记录时间")
    private Date recordTime;

    //记录时间
    @ApiModelProperty(value = "记录时间戳")
    private long recordTimestamp;

    //这个时间点的记录们
    @ApiModelProperty(value = "这个时间点的记录们")
    private List<SvcDataModel> records;

    public AlarmSvcDataModel(Date recordTime, List<SvcDataModel> records) {
        this.recordTime = recordTime;
        this.records = records;
    }

    public AlarmSvcDataModel() {
    }

    /**
     * get
     *
     * @return RecordTime
     */
    public Date getRecordTime() {
        return recordTime;
    }

    /**
     * set
     *
     * @param recordTime recordTime
     */
    public void setRecordTime(Date recordTime) {
        this.recordTime = recordTime;
    }

    /**
     * get
     *
     * @return RecordTimestamp
     */
    public long getRecordTimestamp() {

        if ((recordTimestamp == 0L)&&(recordTime!=null)){
            recordTimestamp = recordTime.getTime();
        }

        return recordTimestamp;
    }

    /**
     * set
     *
     * @param recordTimestamp recordTimestamp
     */
    public void setRecordTimestamp(long recordTimestamp) {
        this.recordTimestamp = recordTimestamp;
    }

    /**
     * get
     *
     * @return Records
     */
    public List<SvcDataModel> getRecords() {
        return records;
    }

    /**
     * set
     *
     * @param records records
     */
    public void setRecords(List<SvcDataModel> records) {
        this.records = records;
    }


}
